<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="file:///android_asset/lemon/css/eventlist.css" />
<link rel="stylesheet" type="text/css" href="file:///android_asset/lemon/css/constants.css" />
<script type="text/javascript" src="file:///android_asset/lemon/js/jquery.min.js" />
<script type="text/javascript" src="file:///android_asset/lemon/js/constants.js" />
<script type="text/javascript" src="file:///android_asset/lemon/js/eventlist.js" />

<script type="text/javascript">
var server_address = window.lemon.js2client(4,null);
var rtl = window.lemon.httpGet(server_address+"/tom/servlet/C2S7News?e_user_id="+user_id+"&e_id=all");
//alert("rtl:"+rtl);
var rtl1 = new Array();
var rtl3 = new Array();
var rtl2 = new String(rtl);
rtl3 = rtl2.split("峩");
</script>


</head>


<body>
<div id='head'>
<script type="text/javascript">
document.write("<h3 id='head' align='center'>"+"记录生活，分享体验"+"</h3>");
</script>
</div>


<script type="text/javascript">


document.write("<div class='div_event' style='margin-top:10%'>");

var j = "";
var reply_e_id = "";
for(var i = 0 ,j = 0; i < rtl3.length - 1; i++ , j++){
	if( j > 2){
	    	break;	
    }
	rtl1 = rtl3[i].split("僫");
	if(rtl1.length > 0){
		// 图片
		
		var stuff_img = new String(rtl1[2]);
		document.write("<div>");
		var e_user_id_img = "<div class='div_event_user'><img src='"+server_address + "/tom/res/img/"+rtl1[1]+".jpg' id='"+rtl1[1]+"' width='60' height='60' class='e_user_id_img' style='float:left' /></div>"; 
		document.write(e_user_id_img);
		if((stuff_img != null) && (stuff_img.length != 0)){
			var str1 = stuff_img.replace(/(.*)(.jpg)/,"$2");
			if(str1 == ".jpg"){
				var img = "<div class='e_img'><img src='"+stuff_img+"' width='180' height='260' class='stuff' style='padding-left:2em'/></div>";
				document.write(img);
			}
		}
		document.write("<div class='clear'></div>");
		document.write("</div>");
		
		// 文本
		
		var str = new String(rtl1[3]);
		document.write("<div class='content' id='"+rtl1[0]+"'>");
		if((str != null) && (str.length != 0) && (str != "null") && (str != undefined) && (str != "undefined")){
			document.write("<p id='my_story' ><strong id='name'>主人:</strong>"+str+" </p>");
		}
		rtl1[6] = rtl1[6].replace(/(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+).(\d+)/,"$2月$3日 $4点$5分");
		document.write("<p><br><br><strong id='name'>顶:</strong> "+  rtl1[4]+"<br><br><strong id='name'>分享时间: </strong><br><br> " + rtl1[6]+"</p> ");
		document.write("</div>");
	}
	
	var r = window.lemon.httpGet(server_address+"/tom/servlet/C2S7News?e_id="+rtl1[0]+"&r_story=all");
	var r1 = new String(r);
	
	var r2 = r1.split("峩");
	for(var n = 0 ; n< r2.length - 1 ; n++){
		var r3 = r2[n].split("僫");
		document.write("<div class='content' >");
		document.write("<p id='my_story' ><strong id='name'>回复:</strong>"+r3[0]+"<br><br>"+r3[1]+" </p><br>");
		document.write("</div>");
	}
	
	
	
	document.write("<div class='upreply'>");
	document.write("<img src='file:///android_asset/lemon/res/up.png' width='64' height='64'  id='"+rtl1[0]+","+rtl1[1]+"' style='padding-left:4em;float:left'></img>");
	document.write("</div>");
	document.write("<div class='editreply'>");
	document.write("<img src='file:///android_asset/lemon/res/edit1.png' width='64' height='64' id='"+rtl1[0]+","+rtl1[1]+"' ></img>");
	document.write("</div>");
	document.write("<hr width='220' align='left' size=1 color=#9d9d9d style='FILTER: alpha(opacity=80,finishopacity=30);left:0px;'>");
}
document.write("<p id='last'></p>");

$(document).ready(function(){
	$(window).scroll(function() {
	    if(document.body.scrollTop + document.body.clientHeight > document.body.scrollHeight / 2){
		if(j == rtl3.length - 1){
			return;
		}
		for(i =j ; i < rtl3.length - 1;i++){
			if(i < j + 1){
				rtl1 = rtl3[i].split("僫");
				var temp = new String();
				if(rtl1.length > 0){
					// 图片
					var stuff_img = new String(rtl1[2]);
					temp = "<div>";
					temp += "<div class='div_event_user'><img src='"+server_address + "/tom/res/img/"+rtl1[1]+".jpg' id='"+rtl1[1]+"' width='60' height='60' class='e_user_id_img' style='float:left' /></div>";
					if((stuff_img != null) && (stuff_img.length != 0)){
						var str1 = stuff_img.replace(/(.*)(.jpg)/,"$2");
						if(str1 == ".jpg"){
							temp += "<div class='e_img'><img src='"+stuff_img+"' width='180' height='260' class='stuff' style='padding-left:2em'/></div>";
						}
					}
					temp += "<div class='clear'></div>";
					temp += "</div>"
					$("p#last").append(temp);
					
					// 文本
					var temp2 = new String();
					var str = new String(rtl1[3]);
					temp2 = "<div class='content' id='"+rtl1[0]+"'>";
					if((str != null) && (str.length != 0) && (str != "null") && (str != undefined) && (str != "undefined")){
						temp2 += "<p id='my_story' ><strong id='name'>主人:</strong>"+str+" </p>";
					}
					rtl1[6] = rtl1[6].replace(/(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+).(\d+)/,"$2月$3日 $4点$5分");
					temp2 += "<p><br><br>顶: "+  rtl1[4] +"<br>分享时间:  <br><br>" + rtl1[6]+"</p> ";
					temp2 += "</div>";
					$("p#last").append(temp2);
					
				}
				var temp3 =  new String();
				
				var rr = window.lemon.httpGet(server_address+"/tom/servlet/C2S7News?e_id="+rtl1[0]+"&r_story=all");
				var rr1 = new String(rr);
	
				var rr2 = new Array();
				rr2 = rr1.split("峩");
				for(var k = 0 ; k < rr2.length - 1 ; k++){
					var rr3 = new Array();
					rr3 = rr2[k].split("僫");
					temp3 = "<div class='content' >";
					rr3[1] = rr3[1].replace(/(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+).(\d+)/,"$2月$3日 $4点$5分");
					temp3 += "<p id='my_story' ><strong id='name'>回复:</strong>"+rr3[0]+"<br><br>"+rr3[1]+" </p><br>";
					temp3 += "</div>";
				}
				
				temp3 += "<div class='upreply'>";
				temp3 += "<img src='file:///android_asset/lemon/res/up.png' width='64' height='64'  id='"+rtl1[0]+","+rtl1[1]+"'  style='padding-left:4em;float:left'></img>";
				temp3 += "</div>";
				temp3 += "<div class='editreply'>";
				temp3 += "<img src='file:///android_asset/lemon/res/edit.png' width='64' height='64' id='"+rtl1[0]+","+rtl1[1]+"' ></img>";
				temp3 += "</div>";
				temp3 +="<hr width='220' align='left' size=1 color=#9d9d9d style='FILTER: alpha(opacity=80,finishopacity=30);left:0px;'>";
				$("p#last").append(temp3);
				
			}else{
				break;
			}
		}
		j = i;
		$(document).ready(function(){
				$("div.div_event_user img").click(function(){
					window.lemon.js2client(2,"friends_detail.html?_id="+this.id+"&user_id="+user_id);
				});
				
			
				$("div.e_img img").click(function(){
						window.lemon.js2client(13,this.src);		
				});

				$("div.upreply img").click(function(){
						var temp4 = new String(this.id);
						var e_id_current = temp4.replace(/(.*),(.*)/,"$1");
						var e_user_id_current = temp4.replace(/(.*),(.*)/,"$2");
						window.lemon.httpGet(server_address+"/tom/servlet/C2S7News?e_user_id="+e_user_id_current+"&e_id="+e_id_current+"&e_score=true");
						window.location.reload();
				});
				
				$("div.editreply img").click(function(){
						window.lemon.js2client(23,this.id);
				});

		});
		}
	});
});
document.write("</div>");



</script>

</body>

</html>